#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>

using namespace std;

int main()
{
	int m, n;
	int x = 0;
	for (int i = 1; i <= 100; i++)
	{
		cin >> m;
		if (m > x)
		{
			x = m;
			n = i;
		}
	}
	cout << x << endl << n;
	return 0;
}